import type { User, UserDto } from '@/types';
import request from '@/utils/request';

export const queryUser = async (params?: UserDto) => {
    const res = await request.post('/user/queryUser',{
        ...params
    });
    return res.data;
}


export const addUser = async (params?: User) => {
    const res = await request.post('/user/addUser',{
        ...params
    });
    return res.data;
}

export const editUser = async (params?: User) => {
    const res = await request.post('/user/editUser',{
        ...params
    });
    return res.data;
}

export const deleteUser = async (UserIds: string[]) => {
    const res = await request.post('/user/deleteUser',UserIds);
    return res.data;
}

export const login = async (params: User) => {
    const res = await request.post('/user/login',{
        ...params
    });
    return res.data;
}